class LunarData {
  final int lunarYear;
  final int lunarMonth;
  final int lunarDay;
  final int lunarHour;
  final String lunarYearChinese;
  final String lunarMonthChinese;
  final String lunarDayChinese;
  final String lunarHourChinese;
  final String weekName;
  final int weekNo;
  final String ganzhiYear;
  final String ganzhiMonth;
  final String ganzhiDay;
  final String ganzhiHour;
  final String wuxingYear;
  final String wuxingMonth;
  final String wuxingDay;
  final String wuxingHour;
  final String colorYear;
  final String colorMonth;
  final String colorDay;
  final String colorHour;
  final String animal;
  final String term;
  final bool isLeap;
  final bool isToday;
  final String constellation;
  final bool isSameYear;
  final List<String> yi;
  final List<String> ji;
  final List<String> jishen;
  final List<String> xiongshen;
  final String pengzugan;
  final String pengzuzhi;
  final String caishen;
  final String caishenDesc;
  final String fushen;
  final String fushenDesc;
  final String xishen;
  final String xishenDesc;
  final String taishen;
  final String gregorianYear;
  final String gregorianMonth;
  final String gregorianDay;
  final String gregorianHour;
  final String shou;
  final String gong;
  final String xiu;
  final String xiuSong;
  final String xiuLuck;
  final String xiuAnimal;
  final String wuhou;

  LunarData({
    required this.lunarYear,
    required this.lunarMonth,
    required this.lunarDay,
    required this.lunarHour,
    required this.lunarYearChinese,
    required this.lunarMonthChinese,
    required this.lunarDayChinese,
    required this.lunarHourChinese,
    required this.weekName,
    required this.weekNo,
    required this.ganzhiYear,
    required this.ganzhiMonth,
    required this.ganzhiDay,
    required this.ganzhiHour,
    required this.wuxingYear,
    required this.wuxingMonth,
    required this.wuxingDay,
    required this.wuxingHour,
    required this.colorYear,
    required this.colorMonth,
    required this.colorDay,
    required this.colorHour,
    required this.animal,
    required this.term,
    required this.isLeap,
    required this.isToday,
    required this.constellation,
    required this.isSameYear,
    required this.yi,
    required this.ji,
    required this.jishen,
    required this.xiongshen,
    required this.pengzugan,
    required this.pengzuzhi,
    required this.caishen,
    required this.caishenDesc,
    required this.fushen,
    required this.fushenDesc,
    required this.xishen,
    required this.xishenDesc,
    required this.taishen,
    required this.gregorianYear,
    required this.gregorianMonth,
    required this.gregorianDay,
    required this.gregorianHour,
    required this.shou,
    required this.gong,
    required this.xiu,
    required this.xiuSong,
    required this.xiuLuck,
    required this.xiuAnimal,
    required this.wuhou,
  });

  factory LunarData.fromJson(Map<String, dynamic> json) {
    return LunarData(
      lunarYear: json['lunar_year'] ?? 0,
      lunarMonth: json['lunar_month'] ?? 0,
      lunarDay: json['lunar_day'] ?? 0,
      lunarHour: json['lunar_hour'] ?? 0,
      lunarYearChinese: json['lunar_year_chinese'] ?? '',
      lunarMonthChinese: json['lunar_month_chinese'] ?? '',
      lunarDayChinese: json['lunar_day_chinese'] ?? '',
      lunarHourChinese: json['lunar_hour_chinese'] ?? '',
      weekName: json['week_name'] ?? '',
      weekNo: json['week_no'] ?? 0,
      ganzhiYear: json['ganzhi_year'] ?? '',
      ganzhiMonth: json['ganzhi_month'] ?? '',
      ganzhiDay: json['ganzhi_day'] ?? '',
      ganzhiHour: json['ganzhi_hour'] ?? '',
      wuxingYear: json['wuxing_year'] ?? '',
      wuxingMonth: json['wuxing_month'] ?? '',
      wuxingDay: json['wuxing_day'] ?? '',
      wuxingHour: json['wuxing_hour'] ?? '',
      colorYear: json['color_year'] ?? '',
      colorMonth: json['color_month'] ?? '',
      colorDay: json['color_day'] ?? '',
      colorHour: json['color_hour'] ?? '',
      animal: json['animal'] ?? '',
      term: json['term'] ?? '',
      isLeap: json['is_leap'] ?? false,
      isToday: json['is_today'] ?? false,
      constellation: json['constellation'] ?? '',
      isSameYear: json['is_same_year'] ?? false,
      yi: List<String>.from(json['yi'] ?? []),
      ji: List<String>.from(json['ji'] ?? []),
      jishen: List<String>.from(json['jishen'] ?? []),
      xiongshen: List<String>.from(json['xiongshen'] ?? []),
      pengzugan: json['pengzugan'] ?? '',
      pengzuzhi: json['pengzuzhi'] ?? '',
      caishen: json['caishen'] ?? '',
      caishenDesc: json['caishen_desc'] ?? '',
      fushen: json['fushen'] ?? '',
      fushenDesc: json['fushen_desc'] ?? '',
      xishen: json['xishen'] ?? '',
      xishenDesc: json['xishen_desc'] ?? '',
      taishen: json['taishen'] ?? '',
      gregorianYear: json['gregorian_year'] ?? '',
      gregorianMonth: json['gregorian_month'] ?? '',
      gregorianDay: json['gregorian_day'] ?? '',
      gregorianHour: json['gregorian_hour'] ?? '',
      shou: json['shou'] ?? '',
      gong: json['gong'] ?? '',
      xiu: json['xiu'] ?? '',
      xiuSong: json['xiu_song'] ?? '',
      xiuLuck: json['xiu_luck'] ?? '',
      xiuAnimal: json['xiu_animal'] ?? '',
      wuhou: json['wuhou'] ?? '',
    );
  }
}
